<div>
    <!-- 可操作图片 -->
    <div ng-if="!onlyView">
        <div ng-repeat="file in dataModel track by $index" class="pull-left img-container">
            <div class="img-info">
                <img ng-src="{{file.cropBase64}}" ng-if="!!file.cropBase64"/>
                <img ng-src="{{file.base64}}" ng-if="!file.cropBase64 && !!file.base64"/>
                <img ng-src="{{file.imgUrlShow}}" ng-if="!file.cropBase64 && !file.base64 && !!file.imgUrlShow"/>
            </div>
            <span class="img-tips" ng-if="file.hasUpload">
                <i class="glyphicon glyphicon-check"></i>
            </span>
            <span class="img-actions">
                <i class="glyphicon glyphicon-trash" title="删除" ng-click="delFile($index)"></i>
                <i class="glyphicon glyphicon-eye-open" title="查看" ng-click="viewImage(file.imgUrlShow)" ng-if="file.hasUpload"></i>
                <i class="glyphicon glyphicon-scissors" title="裁剪" ng-click="scissorFile($index)" ng-if="cropable && !!file.base64"></i>
            </span>
        </div>
        <div class="pull-left img-uploader" ng-if="dataModel.length<maxImgAmount" ngf-select="handleFileSelect($files)" ngf-multiple="multiple" title="点击选择要上传的图片">
            <i class="glyphicon glyphicon-plus"></i>
        </div>
        <div style="clear:both;padding-top:15px;">
            <button type="button" class="btn btn-primary" ng-click="uploadFile()" ng-disabled="isUploadDisabled()">批量上传</button>
            <span>
                注：1，请先上传图片再点击保存按钮(最多{{maxImgAmount}}张)；2，已上传的图片右上角会出现 <i class="glyphicon glyphicon-check"></i> 图标</span>；
                <span ng-if="cropable">3，本次新上传的图片可裁剪(裁剪后尺寸 640*640像素)；</span>
        </div>
    </div>

    <!-- 仅查看图片 -->
    <div ng-if="onlyView">
        <div ng-repeat="file in dataModel track by $index" class="pull-left img-container">
            <div class="img-info">
                <img ng-src="{{file.imgUrlShow}}"/>
            </div>
            <span class="img-actions">
                <i class="glyphicon glyphicon-eye-open" title="查看" ng-click="viewImage(file.imgUrlShow)"></i>
            </span>
        </div>
    </div>
</div>